<!doctype html>
{% load static %}

<html>

<style>

</style>

<!doctype html>
<html>
<head>
    <link rel="stylesheet" type="text/css" href="{% static 'css/login.css' %}">
    <meta charset='utf-8'>
    <title>你的灵感，是下一个杰作的火花。</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>

{% if username == -1 %}
    <script>
        alert("用户名已存在!");
    </script>
<meta http-equiv="refresh" content="10">
{% elif password == -1 %}
    <script>alert("两次密码不相同！");</script>
    <meta http-equiv="refresh" content="10">
{% endif %}
<div class="box">
    <h2>注册</h2>
    <form action="{% url 'register' %}" method="POST">
        {% csrf_token %}
        <div class="inputBox">
            <input type="text" name="user_name">
            <label>账号</label>
        </div>
        <div class="inputBox">
            <input type="password" name="password1">
            <label>密码</label>
        </div>
        <div class="inputBox">
            <input type="password" name="password2">
            <label>再次输入密码</label>
        </div>
        <div class="inputBox">
            <input type="email" name="email">
            <label>邮箱</label>
        </div>
        <input type="submit" name="" value="注册">
    </form>

</div>

</body>
</html>